{include file="public/_meta" /}
<link href="__PUBLIC_ADMIN__css/plugins/iCheck/custom.css" rel="stylesheet">
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>增加机构</h5>
                        <div class="ibox-tools">
                            <a href="{:url('admin/Huijiao/school_list')}" class="btn btn-primary btn-xs">返回列表</a>
                        </div>
                    </div>
                    
                    <div class="ibox-content">
                    	
                        <form action="{:url('admin/Huijiao/school_add_post')}" method="post" id="company_add" class="form-horizontal" enctype="multipart/form-data">
                        	<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">机构类型</label>
								<div class="col-sm-2">
									<select class="form-control" name="state">
										<option value="1" class="dis">请选择</option>
										{foreach name="state" id="vo" key="key"}
										<option value="{$vo.id}" class="dis">{$vo.name}</option>
										{/foreach}
									</select>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">附属机构</label>
								<div class="col-sm-2">
									<select class="form-control" name="relation_id">
										<option value="" class="dis">请选择</option>
										{foreach name="relation_id" id="vo" key="key"}
										<option value="{$vo.id}" class="dis">{$vo.name}</option>
										{/foreach}
									</select>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
							<div class="form-group">
								<label class="col-sm-2 control-label">是否推荐</label>
								<div class="col-sm-2">
									<select class="form-control" name="sort">
										<option value="0" class="dis">不推荐</option>
										<option value="1" class="dis">推荐</option>
									</select>
								</div>
							</div>
                        	<div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">机构名称</label>
                                <div class="col-sm-4">
                                    <input type="text" class="form-control" name="name" required="required">
                                </div>
                            </div>
                        	<div class="hr-line-dashed"></div>
                            <div class="form-group">
								<label class="col-sm-2 control-label">机构缩略图</label>
								<div class="col-sm-10">
									<div class="up">
										<input type="file" class="one" name="file" placeholder="">
										<div id="preview1"  >
						                    <img src="" alt="" >
						                </div>
						            </div>
					            </div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">机构图轮播</label>
								<div class="col-sm-10">
									<div class="up">
										<input placeholder="" name="img1" class="four" type="file">
										<div id="preview4">
											<img src="" alt="">
										</div>
									</div>
									<div class="up" style="margin-left: 10px;">
										<input placeholder="" name="img2" class="two" type="file">
										<div id="preview2">
											<img src="" alt="">
										</div>
									</div>
									<div class="up" style="margin-left: 10px;">
										<input placeholder="" name="img3" class="three" type="file">
										<div id="preview3">
											<img src="" alt="">
										</div>
									</div>
								</div>
							</div>
							<div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学校简称</label>
                                <div class="col-sm-5">
                                    <textarea id="content" name="content" class="form-control" required="" aria-required="true"></textarea>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学校电话</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="tel" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学费</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="tuition" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">经度</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="longitude" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">纬度</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="latitude" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">区</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="area" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">详细地址</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="address" placeholder="">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">关键词</label>
                                <div class="col-sm-4">
                                        <input type="text" class="form-control"  name="key_word" placeholder="">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div id="modal-form" class="modal fade" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="row">
                        <div class="col-sm-6 b-r">
                            <h3 class="m-t-none m-b">登录</h3>

                            <p>欢迎登录本站(⊙o⊙)</p>

                            <form role="form">
                                <div class="form-group">
                                    <label>用户名：</label>
                                    <input type="email" placeholder="请输入用户名" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label>密码：</label>
                                    <input type="password" placeholder="请输入密码" class="form-control">
                                </div>
                                <div>
                                    <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>登录</strong>
                                    </button>
                                    <label>
                                        <input type="checkbox" class="i-checks">自动登录</label>
                                </div>
                            </form>
                        </div>
                        <div class="col-sm-6">
                            <h4>还不是会员？</h4>
                            <p>您可以注册一个账户</p>
                            <p class="text-center">
                                <a href="form_basic.html"><i class="fa fa-sign-in big-icon"></i></a>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
        
    {include file="public/hunanconstr_footer" /}
	
    <!-- 自定义js -->
    <script src="__PUBLIC_ADMIN__js/content.js?v=1.0.0"></script>
    
    <!-- iCheck -->
    <script src="__PUBLIC_ADMIN__js/plugins/iCheck/icheck.min.js"></script>
    
    <!-- 表单验证  -->
    <script>
    $('#company_add').validate({
        // 每一个name值对应一组规则
        company_name: {
            required: true,
            rangelength: [4,10],
            remote: ''    // ajax请求地址
        },
        email: {
            required: true,
            email: true
        }
    });
    </script>
    <script>
        $(document).ready(function() {
        	$('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
			
            $('.refresh').click(function(){
            	window.location.reload();	// 刷新页面
            })
            
          	//iframe窗
          	$('.edit').click(function(){
          		var index = layer.open({
          			type : 2,
					fixed: true,
					scrollbar: false,
					title : '很多时候，我们想最大化看，比如像这个页面。',
					shadeClose : false,
					maxmin : true, //开启最大化最小化按钮
					area : ['893px', '600px'],
					//offset: '100px',
					content : '//www.wei-yong.com'
          		});
          		layer.full(index);
          	})
		});
	</script>
</body>
</html>
